home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
ogrid100.zip
/
GLLSTR.INT
< prev
next >
Wrap
Text File
|
1994-12-29
|
2KB
|
68 lines
{*****************************************************************************
OOGrid Library(TM) v1.0 for Borland/Turbo Pascal (Real Mode/TV)
Copyright (C) 1994 by Arturo J. Monge
Portions Copyright (C) 1989,1990 Borland International, Inc.
Borland's long strings unit:
This is Borland's TCLSTR.PAS unit with some minor
modifications necessary for adapting the LString object for
use by the TSpreadSheet object.
Copyright (C) 1989,1990 Borland International, Inc.
Last Modification : December 29th, 1994
*****************************************************************************}
unit GLLStr;
{$O+,F+}
{****************************************************************************}
interface
{****************************************************************************}
uses Objects;
const
MaxLStringLength = 65521; { The maximum amount that can be allocated
to a pointer }
type
LStringRange = 0..MaxLStringLength;
LStringData = array [1..MaxLStringLength] of Char;
PLStringData = ^LStringData;
PLString = ^LString;
LString = object(TObject)
Len : LStringRange; { Current length }
MaxLen : LStringRange; { Length that has been allocated. This is
always allocated in blocks of 16 bytes so
that the long string's data doesn't have to
be reallocated every time the long string
grows }
Data : PLStringData;
constructor Init;
destructor Done; VIRTUAL;
function SetValue(NewLen : LStringRange; NewData : Pointer) : Boolean;
function FromString(S : String) : Boolean;
function ToString : String;
function Length : LStringRange;
function Copy(Start, Amt : LStringRange) : String;
function Insert(S : String; Start : LStringRange) : Boolean;
procedure Delete(Start, Amt : LStringRange);
function Append(S : String) : Boolean;
procedure Change(Ch : Char; Start : LStringRange);
function Assign(LS : LString) : Boolean;
constructor Load(var S : TStream);
procedure Store(var S : TStream);
end;
{****************************************************************************}
implementation
{****************************************************************************}
...
end.